package com.talos.ums.controller.admin.organization.vo;

import com.talos.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static com.talos.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 组织表分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class UmsOrganizationPageReqVO extends PageParam {

    @Schema(description = "组织编码")
    private String code;

    @Schema(description = "组织名称", example = "赵六")
    private String name;

    @Schema(description = "父级组织id", example = "18935")
    private Long parentId;

    @Schema(description = "父级组织编码")
    private String parentCode;

    @Schema(description = "组织层级")
    private Integer level;

    @Schema(description = "同组内的组织顺序，从1开始累加，一级组织为0")
    private Integer sort;

    @Schema(description = "状态（0:停用 1:启用）", example = "1")
    private Integer status;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "创建人工号")
    private String creatorCode;

    @Schema(description = "创建人姓名", example = "王五")
    private String creatorName;

    @Schema(description = "修改时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] modifyTime;

    @Schema(description = "修改人工号")
    private String modifierCode;

    @Schema(description = "修改人姓名", example = "赵六")
    private String modifierName;

    @Schema(description = "是否结算组织，默认为是")
    private Integer isSettlementOrg;

    @Schema(description = "删除标识，1：正常，2：删除")
    private Integer deleted;

    @Schema(description = "机构编码集合，（新增的自定义字段）")
    private String organizationCodeTree;

    @Schema(description = "机构id集合，（新增的自定义字段）")
    private String organizationIdTree;

    @Schema(description = "组织类型编码（COMPANY：公司；DEPARTMENT：部门）")
    private String organizationTypeCode;

    @Schema(description = "租户编码")
    private String tenantCode;

    @Schema(description = "租户id", example = "20851")
    private Long tenantId;

    @Schema(description = "", example = "18790")
    private Long creatorId;

    @Schema(description = "", example = "6513")
    private Long modifierId;

}
